<template>
  <!-- 横屏 -->
  <div class="landscape-bar">
    <img  v-if="!reverse" class="bar-img" :src="info.pic" v-default-img="defaultImg"/>
    <p class="bar-title">{{ info.title }}</p>
    <p class="bar-sub-title">{{ info.subTitle }}</p>
    <a class="bar-link" :href="info.link">前往></a>
    <img  v-if="reverse" class="bar-img" :src="info.pic" v-default-img="defaultImg"/>
  </div>
</template>

<script>
import defaultImg from '@/assets/images/LandScapeBar.gif'
export default {
  name: 'LandScapeBar',
  components: {defaultImg},
  props: {
    info: [Object],
    reverse: Boolean
  },
  data () {
    return {
      defaultImg
      // defaultImg: require('@/assets/images/LandScapeBar.gif')
    }
  }
}
</script>

<style lang="less" scoped>
.landscape-bar {
  width: 100%;
  height: auto;
  margin-bottom: 10px;
  display: flex;
  flex-flow: column nowrap;
  align-content: center;
  .bar-img {
    width: 100%;
    height: 480px;
  }
  .bar-title {
    width: 100%;
    height: 60px;
    line-height: 60px;
    font-weight: bolder;
    font-size: 30px;
    text-align: center;
    margin: 20px 0;
  }
  .bar-sub-title {
    width: 100%;
    height: 40px;
    line-height: 40px;
    font-weight: bold;
    font-size: 20px;
    text-align: center;
    margin: 10px 0;
  }
  .bar-link {
    display: block;
    width: 100%;
    height: 40px;
    line-height: 40px;
    font-size: 18px;
    text-align: center;
    margin: 10px 0;
  }
}
</style>
